package org.example.blogger.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.blogger.model.UserInfo;

@Mapper
public interface UserInfoMapper {
    //根据用户名查询
    @Select("select * from user where delete_flag =0 and user_name = #{userName}")
    UserInfo selectByName(String userName);
    //根据用户id查询
    @Select("select * from user where delete_flag = 0 and id = #{id}")
    UserInfo selectById(Integer id);
}
